import request from '@/utils/request';

//区域详情趋势图
export function queryAreaDetailTrend(data: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/ops-workbench/ywgzt/areaAlarm/analysis/areaDetailTrend',
		method: 'post',
		data: data,
	});
}

//健康度告警分布趋势图
export function queryHealthAlarmTrend(data: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/ops-workbench/ywgzt/areaAlarm/analysis/alarmTrend',
		method: 'post',
		data: data,
	});
}

// 历史告警查询列表
export function queryTodayHistoryData(data: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/ops-workbench/ywgzt/areaAlarm/analysis/queryTodayHistoryData',
		method: 'post',
		data: data,
	});
}

/** 下载接口 */
// 历史告警查询
export function exportHistoryAlarm(query: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/ops-workbench/ywgzt/areaAlarm/analysis/queryTodayHistoryDataExport',
		method: 'post',
		data: query,
		timeout: 3000000,
		responseType: 'blob',
	});
}
